﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kokomo.Lexical.Coding;
using Kokomo.PeInspector.Reflection.Disassembly;

namespace Kokomo.PeInspector.Reflection
{
	/// <summary>
	/// Used to pass arguments to events regarding <see cref="Statement"/>s.
	/// </summary>
	public class StatementEventArgs : EventArgs
	{
		/// <summary>
		/// Gets the statement.
		/// </summary>
		/// <seealso cref="Statement"/>
		public Statement Statement { get; private set; }
		internal MsilFrameInfo FrameInfo { get; private set; }

		internal StatementEventArgs(
			Statement statement,
			MsilFrameInfo frameInfo = null
			)
		{
			if (statement == null) throw new ArgumentNullException("statement");

			this.Statement = statement;
			this.FrameInfo = frameInfo;
		}
	}
}
